﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace NewGlobalBizAssist
{
    public partial class Geneology : System.Web.UI.Page
    {

        protected void find_click(object sender, Lib.FindUpdateEventArgs e)
        {
            Lib.Member mem = new Lib.Member();
            DataRow dr = mem.GetMemberInfo(e.SelectedValue);
            lblMember.Text = dr["LastName"].ToString() + ", " + dr["FirstName"].ToString() + " ";
            if (dr["MiddleName"]!=null)
                lblMember.Text += dr["MiddleName"].ToString() + (dr["MiddleName"].ToString().Length == 1?".":"");

            lblTbl.Text = mem.GetGeneologyTable(e.SelectedValue);

 
        }

        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
               

                 
                lblTbl.Text = @" Please Select Member to view Member's Geneology";

                
            }
        }
    }
}